//
//  RGDataBase.h
//  RGPopoverTagView
//
//  Created by Rain on 2018/8/22.
//  Copyright © 2018 - 2019 Rain. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <fmdb/FMDB.h>
@interface RGDataBase : NSObject

@property (strong, nonatomic) FMDatabase *database;

+ (RGDataBase *)sharedDataBase;

- (NSMutableArray *)getSearchTextsByTypeID:(NSString *)typeID;

- (NSMutableArray *)getSearchObjectsByTypeID:(NSString *)typeID;

- (NSMutableArray *)getSearchTextsByTypeID:(NSString *)typeID
                                 resultKey:(NSString *)resultKey;

- (NSMutableArray *)getSearchTextsFromTable:(NSString *)tableName
                                  searchKey:(NSString *)searchKey
                                searchValue:(NSString *)searchValue
                                  resultKey:(NSString *)resultKey;

- (NSMutableArray *)getSearchObjectsFromTable:(NSString *)tableName
                                    searchKey:(NSString *)searchKey
                                  searchValue:(NSString *)searchValue
                                    resultKey:(NSString *)resultKey;

- (FMResultSet *)resultSetByTypeID:(NSString *)typeID;

- (FMResultSet *)resultSetBySearchKey:(NSString *)searchKey
                          searchValue:(NSString *)searchValue;

- (FMResultSet *)resultSetFromTable:(NSString *)tableName
                          searchKey:(NSString *)searchKey
                        searchValue:(NSString *)searchValue;

- (NSMutableArray *)getAllSeachTextFromTable:(NSString *)tableName;

@end
